package com.qianyu.project.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qianyu.project.entity.SubTenderDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qianyu.project.mapper.provider.gs.SubTenderDetailMapperProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 分包招标明细 Mapper 接口
 * </p>
 *
 * @author gs
 * @since 2021-01-30
 */
@Repository
public interface SubTenderDetailMapper extends BaseMapper<SubTenderDetail> {

    /**
     * description: 根据计划查 <br/>
     * author: gs   <br/>
     * date: 2021/2/2 <br/>
     * params: [id] <br/>
     * return: java.util.List<com.qianyu.project.entity.TenderPurchaseDetail>
     */
    @Select("select * from sub_tender_detail where subtender_id=#{value}")
    List<SubTenderDetail> selectByPlan(String id);

    /**
     * description: 分页查询 <br/>
     * author: gs   <br/>
     * date: 2021/2/2 <br/>
     * params: [page, params] <br/>
     * return: com.baomidou.mybatisplus.core.metadata.IPage<com.qianyu.project.entity.SubTenderDetail>
     */
    @SelectProvider(type = SubTenderDetailMapperProvider.class,method = "selectPageList")
    IPage<SubTenderDetail> selectPageList(IPage page, @Param("params") Map<String, String> params);
}
